package com.gobuy.goods.feign;

import com.gobuy.common.pojo.Result;
import com.gobuy.goods.config.FeignLogConfig;
import com.gobuy.goods.pojo.Sku;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author Gaozexi on 2020/6/8 10:55
 * Step by Step  and Stand on,  You Are The Best Investment!
 */
@FeignClient(name = "goods",
        configuration = FeignLogConfig.class)
public interface SkuFeign {
    @GetMapping("/sku/spu/{spuId}")
     List<Sku> findSkuListBySpuId(@PathVariable("spuId") String spuId);

    @GetMapping("/sku/{id}")
     Result<Sku> findById(@PathVariable("id") String id);
}
